[Unit]
Description=Gateway Validator Node

[Service]
User=gateway
Group=gateway
WorkingDirectory={{ gateway_user_home }}
Environment="ETH_RPC_URL=https://ropsten-eth.compound.finance"
Environment="ETH_KEY_ID={{ eth_key_id }}"
Environment="OPF_URL=https://prices.compound.finance/coinbase"
Environment="ETH_KEY={{ eth_private_key | default(omit) }}"
Environment="AWS_REGION={{ aws_region | default(omit) }}"
Environment="KEYRING_TYPE={{ keyring_type | default('IN_MEMORY') }}"
Environment="MINER={{ miner }}"
ExecStart={{ gateway_bin }} \
  --base-path {{ chain_data_dir }} \
  --chain {{ gateway_chain_spec_raw }} \
  --port 30333 \
  --ws-port 9944 \
  --ws-external \
  --rpc-port 9933 \
  --rpc-methods Unsafe \
  --rpc-external \
  --no-mdns \
  --log pallet_cash=debug \
  --node-key-file {{ node_key_priv_file }} \
  {% for bootnode_multi_addr in peers -%}
  --bootnodes {{ bootnode_multi_addr }} \
  {% endfor -%}
  --validator \
  --ws-max-connections 1000 \
  --rpc-cors=all
